package com.jinglin.common;


import com.jinglin.pojo.User;

public class UserThreadLocal {
    /**
     * 存储用户信息
     */
    private static final ThreadLocal<User> userThread = new ThreadLocal<>();

    public static void set(User user) {
        userThread.set(user);
    }

    public static User getUser() {
        return userThread.get();
    }

    public static void remove() {
        userThread.remove();
    }
}

